<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pybindgen.typehandlers.base.DeclarationsScope</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pybindgen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pybindgen-module.html">Package&nbsp;pybindgen</a> ::
        <a href="pybindgen.typehandlers-module.html">Package&nbsp;typehandlers</a> ::
        <a href="pybindgen.typehandlers.base-module.html">Module&nbsp;base</a> ::
        Class&nbsp;DeclarationsScope
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pybindgen.typehandlers.base.DeclarationsScope-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class DeclarationsScope</h1><p class="nomargin-top"><span class="codelink"><a href="pybindgen.typehandlers.base-pysrc.html#DeclarationsScope">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_pybindge_75" name="uml_class_diagram_for_pybindge_75">
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#__init__" title="Constructor" alt="" coords="17,36,396,55"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#clear" title="pybindgen.typehandlers.base.DeclarationsScope.clear" alt="" coords="17,55,396,73"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#declare_variable" title="Add code to declare a variable." alt="" coords="17,73,396,92"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#reserve_variable" title="Reserve a variable name, to be used later." alt="" coords="17,92,396,111"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#get_code_sink" title="Returns the internal MemoryCodeSink that holds all declararions." alt="" coords="17,111,396,129"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html" title="Manages variable declarations in a given scope." alt="" coords="16,11,397,131"/>
</map>
  <img src="uml_class_diagram_for_pybindge_75.gif" alt='' usemap="#uml_class_diagram_for_pybindge_75" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<p>Manages variable declarations in a given scope.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pybindgen.typehandlers.base.DeclarationsScope-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">parent_scope</span>=<span class="summary-sig-default">None</span>)</span><br />
      Constructor</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="pybindgen.typehandlers.base-pysrc.html#DeclarationsScope.__init__">source&nbsp;code</a></span>
            <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for___init___56-summary-div');return false;">call&nbsp;graph</a></span>&nbsp;
          </td>
        </tr>
      </table>
      <div style="display:none" id="call_graph_for___init___56-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for___init___56" name="call_graph_for___init___56">
<area shape="rect" href="pybindgen.cppclass.CppClass-class.html#_generate_copy_method" title="cppclass.CppClass._generate_copy_method()" alt="" coords="7,5,433,37"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#__init__" title="__init__()" alt="" coords="484,117,588,149"/>
<area shape="rect" href="pybindgen.cppclass.CppClass-class.html#_generate_destructor" title="cppclass.CppClass._generate_destructor()" alt="" coords="20,61,420,93"/>
<area shape="rect" href="pybindgen.module.ModuleBase-class.html#__init__" title="module.ModuleBase.__init__()" alt="" coords="73,117,367,149"/>
<area shape="rect" href="pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#__init__" title="codesink.MemoryCodeSink.__init__()" alt="" coords="639,117,993,149"/>
<area shape="rect" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#__init__" title="ForwardWrapperBase.__init__()" alt="" coords="65,173,375,205"/>
<area shape="rect" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#__init__" title="ReverseWrapperBase.__init__()" alt="" coords="67,229,373,261"/>
</map>
  <img src="call_graph_for___init___56.gif" alt='' usemap="#call_graph_for___init___56" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="clear"></a><span class="summary-sig-name">clear</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="pybindgen.typehandlers.base-pysrc.html#DeclarationsScope.clear">source&nbsp;code</a></span>
            <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_clear_3-summary-div');return false;">call&nbsp;graph</a></span>&nbsp;
          </td>
        </tr>
      </table>
      <div style="display:none" id="call_graph_for_clear_3-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_clear_3" name="call_graph_for_clear_3">
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#clear" title="clear()" alt="" coords="560,33,640,65"/>
<area shape="rect" href="pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#__init__" title="codesink.MemoryCodeSink.__init__()" alt="" coords="689,33,1044,65"/>
<area shape="rect" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#reset_code_generation_state" title="ForwardWrapperBase.reset_code_generation_state()" alt="" coords="5,5,512,37"/>
<area shape="rect" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#reset_code_generation_state" title="ReverseWrapperBase.reset_code_generation_state()" alt="" coords="7,61,511,93"/>
</map>
  <img src="call_graph_for_clear_3.gif" alt='' usemap="#call_graph_for_clear_3" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pybindgen.typehandlers.base.DeclarationsScope-class.html#declare_variable" class="summary-sig-name">declare_variable</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">type_</span>,
        <span class="summary-sig-arg">name</span>,
        <span class="summary-sig-arg">initializer</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">array</span>=<span class="summary-sig-default">None</span>)</span><br />
      Add code to declare a variable.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="pybindgen.typehandlers.base-pysrc.html#DeclarationsScope.declare_variable">source&nbsp;code</a></span>
            <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_declare_variabl_2-summary-div');return false;">call&nbsp;graph</a></span>&nbsp;
          </td>
        </tr>
      </table>
      <div style="display:none" id="call_graph_for_declare_variabl_2-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_declare_variabl_2" name="call_graph_for_declare_variabl_2">
<area shape="rect" href="pybindgen.container.ContainerParameter-class.html#convert_c_to_python" title="container.ContainerParameter.convert_c_to_python()" alt="" coords="85,24,595,56"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#declare_variable" title="declare_variable()" alt="" coords="723,1172,907,1204"/>
<area shape="rect" href="pybindgen.container.ContainerParameter-class.html#convert_python_to_c" title="container.ContainerParameter.convert_python_to_c()" alt="" coords="85,80,595,112"/>
<area shape="rect" href="pybindgen.container.ContainerPtrParameter-class.html#convert_python_to_c" title="container.ContainerPtrParameter.convert_python_to_c()" alt="" coords="71,136,609,168"/>
<area shape="rect" href="pybindgen.container.ContainerRefParameter-class.html#convert_c_to_python" title="container.ContainerRefParameter.convert_c_to_python()" alt="" coords="71,192,609,224"/>
<area shape="rect" href="pybindgen.container.ContainerRefParameter-class.html#convert_python_to_c" title="container.ContainerRefParameter.convert_python_to_c()" alt="" coords="71,248,609,280"/>
<area shape="rect" href="pybindgen.container.ContainerReturnValue-class.html#convert_c_to_python" title="container.ContainerReturnValue.convert_c_to_python()" alt="" coords="75,304,605,336"/>
<area shape="rect" href="pybindgen.container.IterNextWrapper-class.html#reset_code_generation_state" title="container.IterNextWrapper.reset_code_generation_state()" alt="" coords="64,360,616,392"/>
<area shape="rect" href="pybindgen.converter_functions.PythonToCConverter-class.html#generate" title="converter_functions.PythonToCConverter.generate()" alt="" coords="88,416,592,448"/>
<area shape="rect" href="pybindgen.cppattribute.CppInstanceAttributeSetter-class.html#generate" title="cppattribute.CppInstanceAttributeSetter.generate()" alt="" coords="92,472,588,504"/>
<area shape="rect" href="pybindgen.cppattribute.CppStaticAttributeSetter-class.html#generate" title="cppattribute.CppStaticAttributeSetter.generate()" alt="" coords="104,528,576,560"/>
<area shape="rect" href="pybindgen.cppclass.CppClass-class.html#_generate_copy_method" title="cppclass.CppClass._generate_copy_method()" alt="" coords="127,584,553,616"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassParameter-class.html#convert_c_to_python" title="cppclass_typehandlers.CppClassParameter.convert_c_to_python()" alt="" coords="31,640,649,672"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassParameter-class.html#convert_python_to_c" title="cppclass_typehandlers.CppClassParameter.convert_python_to_c()" alt="" coords="31,696,649,728"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#convert_c_to_python" title="cppclass_typehandlers.CppClassPtrParameter.convert_c_to_python()" alt="" coords="16,752,664,784"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#convert_python_to_c" title="cppclass_typehandlers.CppClassPtrParameter.convert_python_to_c()" alt="" coords="16,808,664,840"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#convert_c_to_python" title="cppclass_typehandlers.CppClassPtrReturnValue.convert_c_to_python()" alt="" coords="7,864,673,896"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#convert_c_to_python" title="cppclass_typehandlers.CppClassRefParameter.convert_c_to_python()" alt="" coords="16,920,664,952"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#convert_python_to_c" title="cppclass_typehandlers.CppClassRefParameter.convert_python_to_c()" alt="" coords="16,976,664,1008"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#convert_c_to_python" title="cppclass_typehandlers.CppClassReturnValue.convert_c_to_python()" alt="" coords="20,1032,660,1064"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#convert_python_to_c" title="cppclass_typehandlers.CppClassReturnValue.convert_python_to_c()" alt="" coords="20,1088,660,1120"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers-module.html#_add_ward" title="cppclass_typehandlers._add_ward()" alt="" coords="168,1144,512,1176"/>
<area shape="rect" href="pybindgen.cppmethod.CppVirtualMethodProxy-class.html#generate" title="cppmethod.CppVirtualMethodProxy.generate()" alt="" coords="117,1200,563,1232"/>
<area shape="rect" href="pybindgen.module.ModuleBase-class.html#do_generate" title="module.ModuleBase.do_generate()" alt="" coords="171,1256,509,1288"/>
<area shape="rect" href="pybindgen.typehandlers.base.CodeBlock-class.html#declare_variable" title="CodeBlock.declare_variable()" alt="" coords="197,1312,483,1344"/>
<area shape="rect" href="pybindgen.typehandlers.base-module.html#join_ctype_and_name" title="join_ctype_and_name()" alt="" coords="1015,1144,1247,1176"/>
<area shape="rect" href="pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#writeln" title="codesink.MemoryCodeSink.writeln()" alt="" coords="955,1200,1307,1232"/>
<area shape="rect" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#__init__" title="ForwardWrapperBase.__init__()" alt="" coords="185,1368,495,1400"/>
<area shape="rect" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#generate_body" title="ForwardWrapperBase.generate_body()" alt="" coords="152,1424,528,1456"/>
<area shape="rect" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#reset_code_generation_state" title="ForwardWrapperBase.reset_code_generation_state()" alt="" coords="87,1480,593,1512"/>
<area shape="rect" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#_generate_gil_code" title="ReverseWrapperBase._generate_gil_code()" alt="" coords="133,1536,547,1568"/>
<area shape="rect" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#generate" title="ReverseWrapperBase.generate()" alt="" coords="180,1592,500,1624"/>
<area shape="rect" href="pybindgen.typehandlers.doubletype.DoubleParam-class.html#convert_python_to_c" title="doubletype.DoubleParam.convert_python_to_c()" alt="" coords="108,1648,572,1680"/>
<area shape="rect" href="pybindgen.typehandlers.floattype.FloatPtrParam-class.html#convert_python_to_c" title="floattype.FloatPtrParam.convert_python_to_c()" alt="" coords="112,1704,568,1736"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.IntParam-class.html#convert_python_to_c" title="inttype.IntParam.convert_python_to_c()" alt="" coords="145,1760,535,1792"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.IntRefParam-class.html#convert_python_to_c" title="inttype.IntRefParam.convert_python_to_c()" alt="" coords="131,1816,549,1848"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.SizeTParam-class.html#convert_python_to_c" title="inttype.SizeTParam.convert_python_to_c()" alt="" coords="132,1872,548,1904"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.UInt16Return-class.html#convert_python_to_c" title="inttype.UInt16Return.convert_python_to_c()" alt="" coords="124,1928,556,1960"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.UInt8Return-class.html#convert_python_to_c" title="inttype.UInt8Return.convert_python_to_c()" alt="" coords="129,1984,551,2016"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.UnsignedIntParam-class.html#convert_python_to_c" title="inttype.UnsignedIntParam.convert_python_to_c()" alt="" coords="103,2040,577,2072"/>
<area shape="rect" href="pybindgen.typehandlers.pyobjecttype.PyObjectParam-class.html#convert_python_to_c" title="pyobjecttype.PyObjectParam.convert_python_to_c()" alt="" coords="91,2096,589,2128"/>
<area shape="rect" href="pybindgen.typehandlers.stringtype.CStringParam-class.html#convert_python_to_c" title="stringtype.CStringParam.convert_python_to_c()" alt="" coords="109,2152,571,2184"/>
<area shape="rect" href="pybindgen.typehandlers.stringtype.StdStringParam-class.html#convert_python_to_c" title="stringtype.StdStringParam.convert_python_to_c()" alt="" coords="100,2208,580,2240"/>
<area shape="rect" href="pybindgen.typehandlers.stringtype.StdStringRefParam-class.html#convert_python_to_c" title="stringtype.StdStringRefParam.convert_python_to_c()" alt="" coords="87,2264,593,2296"/>
<area shape="rect" href="pybindgen.typehandlers.stringtype.StdStringReturn-class.html#convert_python_to_c" title="stringtype.StdStringReturn.convert_python_to_c()" alt="" coords="99,2320,581,2352"/>
</map>
  <img src="call_graph_for_declare_variabl_2.gif" alt='' usemap="#call_graph_for_declare_variabl_2" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="pybindgen.typehandlers.base.DeclarationsScope-class.html#reserve_variable" class="summary-sig-name">reserve_variable</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">name</span>)</span><br />
      Reserve a variable name, to be used later.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="pybindgen.typehandlers.base-pysrc.html#DeclarationsScope.reserve_variable">source&nbsp;code</a></span>
            <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_reserve_variabl-summary-div');return false;">call&nbsp;graph</a></span>&nbsp;
          </td>
        </tr>
      </table>
      <div style="display:none" id="call_graph_for_reserve_variabl-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_reserve_variabl" name="call_graph_for_reserve_variabl">
<area shape="rect" href="pybindgen.cppattribute.CppInstanceAttributeSetter-class.html#generate" title="cppattribute.CppInstanceAttributeSetter.generate()" alt="" coords="5,5,501,37"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#reserve_variable" title="reserve_variable()" alt="" coords="551,5,737,37"/>
</map>
  <img src="call_graph_for_reserve_variabl.gif" alt='' usemap="#call_graph_for_reserve_variabl" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="get_code_sink"></a><span class="summary-sig-name">get_code_sink</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the internal MemoryCodeSink that holds all declararions.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="pybindgen.typehandlers.base-pysrc.html#DeclarationsScope.get_code_sink">source&nbsp;code</a></span>
            <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_get_code_sink-summary-div');return false;">call&nbsp;graph</a></span>&nbsp;
          </td>
        </tr>
      </table>
      <div style="display:none" id="call_graph_for_get_code_sink-summary-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_get_code_sink" name="call_graph_for_get_code_sink">
<area shape="rect" href="pybindgen.converter_functions.CToPythonConverter-class.html#generate" title="converter_functions.CToPythonConverter.generate()" alt="" coords="5,5,509,37"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#get_code_sink" title="get_code_sink()" alt="" coords="559,229,721,261"/>
<area shape="rect" href="pybindgen.converter_functions.PythonToCConverter-class.html#generate" title="converter_functions.PythonToCConverter.generate()" alt="" coords="5,61,509,93"/>
<area shape="rect" href="pybindgen.cppattribute.CppInstanceAttributeSetter-class.html#generate" title="cppattribute.CppInstanceAttributeSetter.generate()" alt="" coords="9,117,505,149"/>
<area shape="rect" href="pybindgen.cppattribute.CppStaticAttributeSetter-class.html#generate" title="cppattribute.CppStaticAttributeSetter.generate()" alt="" coords="21,173,493,205"/>
<area shape="rect" href="pybindgen.cppclass.CppClass-class.html#_generate_copy_method" title="cppclass.CppClass._generate_copy_method()" alt="" coords="44,229,471,261"/>
<area shape="rect" href="pybindgen.cppclass.CppClass-class.html#_generate_destructor" title="cppclass.CppClass._generate_destructor()" alt="" coords="57,285,457,317"/>
<area shape="rect" href="pybindgen.module.ModuleBase-class.html#do_generate" title="module.ModuleBase.do_generate()" alt="" coords="88,341,427,373"/>
<area shape="rect" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#generate_body" title="ForwardWrapperBase.generate_body()" alt="" coords="69,397,445,429"/>
<area shape="rect" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#generate" title="ReverseWrapperBase.generate()" alt="" coords="97,453,417,485"/>
</map>
  <img src="call_graph_for_get_code_sink.gif" alt='' usemap="#call_graph_for_get_code_sink" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Properties</span></td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">parent_scope</span>=<span class="sig-default">None</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pybindgen.typehandlers.base-pysrc.html#DeclarationsScope.__init__">source&nbsp;code</a></span>&nbsp;
    <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for___init___56-div');return false;">call&nbsp;graph</a></span>&nbsp;</td>
  </tr></table>
  <div style="display:none" id="call_graph_for___init___56-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for___init___56" name="call_graph_for___init___56">
<area shape="rect" href="pybindgen.cppclass.CppClass-class.html#_generate_copy_method" title="cppclass.CppClass._generate_copy_method()" alt="" coords="7,5,433,37"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#__init__" title="__init__()" alt="" coords="484,117,588,149"/>
<area shape="rect" href="pybindgen.cppclass.CppClass-class.html#_generate_destructor" title="cppclass.CppClass._generate_destructor()" alt="" coords="20,61,420,93"/>
<area shape="rect" href="pybindgen.module.ModuleBase-class.html#__init__" title="module.ModuleBase.__init__()" alt="" coords="73,117,367,149"/>
<area shape="rect" href="pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#__init__" title="codesink.MemoryCodeSink.__init__()" alt="" coords="639,117,993,149"/>
<area shape="rect" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#__init__" title="ForwardWrapperBase.__init__()" alt="" coords="65,173,375,205"/>
<area shape="rect" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#__init__" title="ReverseWrapperBase.__init__()" alt="" coords="67,229,373,261"/>
</map>
  <img src="call_graph_for___init___56.gif" alt='' usemap="#call_graph_for___init___56" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

  <p>Constructor</p>
<pre class="py-doctest">
<span class="py-prompt">&gt;&gt;&gt; </span>scope = DeclarationsScope()
<span class="py-prompt">&gt;&gt;&gt; </span>scope.declare_variable(<span class="py-string">'int'</span>, <span class="py-string">'foo'</span>)
<span class="py-output">'foo'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>scope.declare_variable(<span class="py-string">'char*'</span>, <span class="py-string">'bar'</span>)
<span class="py-output">'bar'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>scope.declare_variable(<span class="py-string">'int'</span>, <span class="py-string">'foo'</span>)
<span class="py-output">'foo2'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>scope.declare_variable(<span class="py-string">'int'</span>, <span class="py-string">'foo'</span>, <span class="py-string">'1'</span>)
<span class="py-output">'foo3'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span>scope.declare_variable(<span class="py-string">'const char *'</span>, <span class="py-string">'kwargs'</span>, <span class="py-string">'{&quot;hello&quot;, NULL}'</span>, <span class="py-string">'[]'</span>)
<span class="py-output">'kwargs'</span>
<span class="py-output"></span><span class="py-prompt">&gt;&gt;&gt; </span><span class="py-keyword">print</span> scope.get_code_sink().flush().rstrip()
<span class="py-output">int foo;</span>
<span class="py-output">char *bar;</span>
<span class="py-output">int foo2;</span>
<span class="py-output">int foo3 = 1;</span>
<span class="py-output">const char *kwargs[] = {&quot;hello&quot;, NULL};</span></pre>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>parent_scope</code></strong> - optional 'parent scope'; if given, declarations in this scope 
          will avoid clashing with names in the parent scope, and vice 
          versa.</li>
    </ul></dd>
    <dt>Overrides:
        object.__init__
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="declare_variable"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">declare_variable</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">type_</span>,
        <span class="sig-arg">name</span>,
        <span class="sig-arg">initializer</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">array</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pybindgen.typehandlers.base-pysrc.html#DeclarationsScope.declare_variable">source&nbsp;code</a></span>&nbsp;
    <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_declare_variabl_2-div');return false;">call&nbsp;graph</a></span>&nbsp;</td>
  </tr></table>
  <div style="display:none" id="call_graph_for_declare_variabl_2-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_declare_variabl_2" name="call_graph_for_declare_variabl_2">
<area shape="rect" href="pybindgen.container.ContainerParameter-class.html#convert_c_to_python" title="container.ContainerParameter.convert_c_to_python()" alt="" coords="85,24,595,56"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#declare_variable" title="declare_variable()" alt="" coords="723,1172,907,1204"/>
<area shape="rect" href="pybindgen.container.ContainerParameter-class.html#convert_python_to_c" title="container.ContainerParameter.convert_python_to_c()" alt="" coords="85,80,595,112"/>
<area shape="rect" href="pybindgen.container.ContainerPtrParameter-class.html#convert_python_to_c" title="container.ContainerPtrParameter.convert_python_to_c()" alt="" coords="71,136,609,168"/>
<area shape="rect" href="pybindgen.container.ContainerRefParameter-class.html#convert_c_to_python" title="container.ContainerRefParameter.convert_c_to_python()" alt="" coords="71,192,609,224"/>
<area shape="rect" href="pybindgen.container.ContainerRefParameter-class.html#convert_python_to_c" title="container.ContainerRefParameter.convert_python_to_c()" alt="" coords="71,248,609,280"/>
<area shape="rect" href="pybindgen.container.ContainerReturnValue-class.html#convert_c_to_python" title="container.ContainerReturnValue.convert_c_to_python()" alt="" coords="75,304,605,336"/>
<area shape="rect" href="pybindgen.container.IterNextWrapper-class.html#reset_code_generation_state" title="container.IterNextWrapper.reset_code_generation_state()" alt="" coords="64,360,616,392"/>
<area shape="rect" href="pybindgen.converter_functions.PythonToCConverter-class.html#generate" title="converter_functions.PythonToCConverter.generate()" alt="" coords="88,416,592,448"/>
<area shape="rect" href="pybindgen.cppattribute.CppInstanceAttributeSetter-class.html#generate" title="cppattribute.CppInstanceAttributeSetter.generate()" alt="" coords="92,472,588,504"/>
<area shape="rect" href="pybindgen.cppattribute.CppStaticAttributeSetter-class.html#generate" title="cppattribute.CppStaticAttributeSetter.generate()" alt="" coords="104,528,576,560"/>
<area shape="rect" href="pybindgen.cppclass.CppClass-class.html#_generate_copy_method" title="cppclass.CppClass._generate_copy_method()" alt="" coords="127,584,553,616"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassParameter-class.html#convert_c_to_python" title="cppclass_typehandlers.CppClassParameter.convert_c_to_python()" alt="" coords="31,640,649,672"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassParameter-class.html#convert_python_to_c" title="cppclass_typehandlers.CppClassParameter.convert_python_to_c()" alt="" coords="31,696,649,728"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#convert_c_to_python" title="cppclass_typehandlers.CppClassPtrParameter.convert_c_to_python()" alt="" coords="16,752,664,784"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassPtrParameter-class.html#convert_python_to_c" title="cppclass_typehandlers.CppClassPtrParameter.convert_python_to_c()" alt="" coords="16,808,664,840"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassPtrReturnValue-class.html#convert_c_to_python" title="cppclass_typehandlers.CppClassPtrReturnValue.convert_c_to_python()" alt="" coords="7,864,673,896"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#convert_c_to_python" title="cppclass_typehandlers.CppClassRefParameter.convert_c_to_python()" alt="" coords="16,920,664,952"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassRefParameter-class.html#convert_python_to_c" title="cppclass_typehandlers.CppClassRefParameter.convert_python_to_c()" alt="" coords="16,976,664,1008"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#convert_c_to_python" title="cppclass_typehandlers.CppClassReturnValue.convert_c_to_python()" alt="" coords="20,1032,660,1064"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers.CppClassReturnValue-class.html#convert_python_to_c" title="cppclass_typehandlers.CppClassReturnValue.convert_python_to_c()" alt="" coords="20,1088,660,1120"/>
<area shape="rect" href="pybindgen.cppclass_typehandlers-module.html#_add_ward" title="cppclass_typehandlers._add_ward()" alt="" coords="168,1144,512,1176"/>
<area shape="rect" href="pybindgen.cppmethod.CppVirtualMethodProxy-class.html#generate" title="cppmethod.CppVirtualMethodProxy.generate()" alt="" coords="117,1200,563,1232"/>
<area shape="rect" href="pybindgen.module.ModuleBase-class.html#do_generate" title="module.ModuleBase.do_generate()" alt="" coords="171,1256,509,1288"/>
<area shape="rect" href="pybindgen.typehandlers.base.CodeBlock-class.html#declare_variable" title="CodeBlock.declare_variable()" alt="" coords="197,1312,483,1344"/>
<area shape="rect" href="pybindgen.typehandlers.base-module.html#join_ctype_and_name" title="join_ctype_and_name()" alt="" coords="1015,1144,1247,1176"/>
<area shape="rect" href="pybindgen.typehandlers.codesink.MemoryCodeSink-class.html#writeln" title="codesink.MemoryCodeSink.writeln()" alt="" coords="955,1200,1307,1232"/>
<area shape="rect" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#__init__" title="ForwardWrapperBase.__init__()" alt="" coords="185,1368,495,1400"/>
<area shape="rect" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#generate_body" title="ForwardWrapperBase.generate_body()" alt="" coords="152,1424,528,1456"/>
<area shape="rect" href="pybindgen.typehandlers.base.ForwardWrapperBase-class.html#reset_code_generation_state" title="ForwardWrapperBase.reset_code_generation_state()" alt="" coords="87,1480,593,1512"/>
<area shape="rect" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#_generate_gil_code" title="ReverseWrapperBase._generate_gil_code()" alt="" coords="133,1536,547,1568"/>
<area shape="rect" href="pybindgen.typehandlers.base.ReverseWrapperBase-class.html#generate" title="ReverseWrapperBase.generate()" alt="" coords="180,1592,500,1624"/>
<area shape="rect" href="pybindgen.typehandlers.doubletype.DoubleParam-class.html#convert_python_to_c" title="doubletype.DoubleParam.convert_python_to_c()" alt="" coords="108,1648,572,1680"/>
<area shape="rect" href="pybindgen.typehandlers.floattype.FloatPtrParam-class.html#convert_python_to_c" title="floattype.FloatPtrParam.convert_python_to_c()" alt="" coords="112,1704,568,1736"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.IntParam-class.html#convert_python_to_c" title="inttype.IntParam.convert_python_to_c()" alt="" coords="145,1760,535,1792"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.IntRefParam-class.html#convert_python_to_c" title="inttype.IntRefParam.convert_python_to_c()" alt="" coords="131,1816,549,1848"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.SizeTParam-class.html#convert_python_to_c" title="inttype.SizeTParam.convert_python_to_c()" alt="" coords="132,1872,548,1904"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.UInt16Return-class.html#convert_python_to_c" title="inttype.UInt16Return.convert_python_to_c()" alt="" coords="124,1928,556,1960"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.UInt8Return-class.html#convert_python_to_c" title="inttype.UInt8Return.convert_python_to_c()" alt="" coords="129,1984,551,2016"/>
<area shape="rect" href="pybindgen.typehandlers.inttype.UnsignedIntParam-class.html#convert_python_to_c" title="inttype.UnsignedIntParam.convert_python_to_c()" alt="" coords="103,2040,577,2072"/>
<area shape="rect" href="pybindgen.typehandlers.pyobjecttype.PyObjectParam-class.html#convert_python_to_c" title="pyobjecttype.PyObjectParam.convert_python_to_c()" alt="" coords="91,2096,589,2128"/>
<area shape="rect" href="pybindgen.typehandlers.stringtype.CStringParam-class.html#convert_python_to_c" title="stringtype.CStringParam.convert_python_to_c()" alt="" coords="109,2152,571,2184"/>
<area shape="rect" href="pybindgen.typehandlers.stringtype.StdStringParam-class.html#convert_python_to_c" title="stringtype.StdStringParam.convert_python_to_c()" alt="" coords="100,2208,580,2240"/>
<area shape="rect" href="pybindgen.typehandlers.stringtype.StdStringRefParam-class.html#convert_python_to_c" title="stringtype.StdStringRefParam.convert_python_to_c()" alt="" coords="87,2264,593,2296"/>
<area shape="rect" href="pybindgen.typehandlers.stringtype.StdStringReturn-class.html#convert_python_to_c" title="stringtype.StdStringReturn.convert_python_to_c()" alt="" coords="99,2320,581,2352"/>
</map>
  <img src="call_graph_for_declare_variabl_2.gif" alt='' usemap="#call_graph_for_declare_variabl_2" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

  <p>Add code to declare a variable. Returns the actual variable name used 
  (uses 'name' as base, with a number in case of conflict.)</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>type_</code></strong> - C type name of the variable</li>
        <li><strong class="pname"><code>name</code></strong> - base name of the variable; actual name used can be slightly 
          different in case of name conflict.</li>
        <li><strong class="pname"><code>initializer</code></strong> - optional, value to initialize the variable with</li>
        <li><strong class="pname"><code>array</code></strong> - optional, array size specifiction, e.g. '[]', or '[100]'</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="reserve_variable"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">reserve_variable</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">name</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="pybindgen.typehandlers.base-pysrc.html#DeclarationsScope.reserve_variable">source&nbsp;code</a></span>&nbsp;
    <br /><span class="codelink"><a href="javascript:void(0);" onclick="toggleCallGraph('call_graph_for_reserve_variabl-div');return false;">call&nbsp;graph</a></span>&nbsp;</td>
  </tr></table>
  <div style="display:none" id="call_graph_for_reserve_variabl-div"><center>
<table border="0" cellpadding="0" cellspacing="0">
  <tr><td><center>  <map id="call_graph_for_reserve_variabl" name="call_graph_for_reserve_variabl">
<area shape="rect" href="pybindgen.cppattribute.CppInstanceAttributeSetter-class.html#generate" title="cppattribute.CppInstanceAttributeSetter.generate()" alt="" coords="5,5,501,37"/>
<area shape="rect" href="pybindgen.typehandlers.base.DeclarationsScope-class.html#reserve_variable" title="reserve_variable()" alt="" coords="551,5,737,37"/>
</map>
  <img src="call_graph_for_reserve_variabl.gif" alt='' usemap="#call_graph_for_reserve_variabl" ismap="ismap" class="graph-without-title" />
</center></td></tr>
  <tr><th>Call Graph</th></tr>
</table><br />
</center></div>

  <p>Reserve a variable name, to be used later.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>name</code></strong> - base name of the variable; actual name used can be slightly 
          different in case of name conflict.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pybindgen-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Jul 12 17:23:28 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
